package com.yugao.fintech.vctgone.log.config;

import com.yugao.fintech.vctgone.auth.api.feign.FeignLogService;
import com.yugao.fintech.vctgone.log.aspect.LogAspect;
import com.yugao.fintech.vctgone.log.listener.LogListener;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;

@AutoConfiguration
@EnableAsync
public class LogAutoConfiguration {
    @Bean
    public LogListener logListener(FeignLogService logService) {
        return new LogListener(logService);
    }

    @Bean
    public LogAspect logAspect() {
        return new LogAspect();
    }
}
